package Chapter04;

public class Triangle5 {

 public static void main(String[] args) {
  int n, i, k, j;
  for (n = 1; n <= 8; n++) {
   for (j = 1; j <= 8 - n; j++) {
    System.out.print(" ");
   }
   for (k = 1; k <= n; k++)
    System.out.print(k);
   for (j = n - 1; j >= 1; j--)
    System.out.print(j);
   System.out.println("\n");

  }
 }

}